package zhtt.example.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import zhtt.example.entry.NacosConfig;

/**
 * @ClassName : PropertityController  //类名
 * @Description :   //描述
 * @Author : zhtt  //作者
 * @Date: 2024-10-27 20:17  //时间
 */
@RestController
@RequestMapping("/propertity")
@RefreshScope// 此注解热更新
public class PropertityController {

    @Value("${user.pwd1}")
    private String a;

    @Autowired
    private NacosConfig nacosConfig;

    @GetMapping("/all")
    public String getServiceNames() {
        return a;
    }

    @GetMapping("/all1")
    public NacosConfig all1() {
        return nacosConfig;
    }
}
